import { useNavigate } from "react-router-dom";

const Home = () => {
  const navigate = useNavigate();

  return <div>
    <h2>Home</h2>
    <div>
      <button onClick={() => navigate('/ActivityList', { state: { kw: '沙龙' } })}>跳转活动列表(带状态参数)</button>
    </div>
    <div>
      <button onClick={() => navigate('/ActivityVerify')}>跳转活动审核页</button>
    </div>
    <div>
      <button onClick={() => navigate(`/Login?type=register&backUrl=${encodeURIComponent(location.href)}`)}>跳转登录页(带query参数)</button>
    </div>
  </div>
}

export default Home